package com.dmap.knowledge.service;

import com.dmap.knowledge.controller.api.param.ArticleEditParam;
import com.dmap.knowledge.controller.api.param.ArticleParam;
import com.dmap.knowledge.po.Article;
import com.dmap.knowledge.vo.ArticleInfoOneVo;

import java.util.List;

public interface ArticleService {
    
    /**
     * 通过id查找文章
     *
     * @param id
     * @return
     */
    public Article selectByArticleId(long id);
    
    /**
     * 插入article
     *
     * @param articleParam
     * @return
     */
    public int insertArticle(ArticleParam articleParam);
    
    /**
     * 更新article
     *
     * @param articleEditParam
     * @return
     */
    public int updateArticle(ArticleEditParam articleEditParam);
    /**
     * 批量删除article
     *
     * @param articleIds
     * @return
     */
    public int deleteArticleList(String articleIds);
    
    /**
     * 查看单个article
     *
     * @param articleId
     * @return
     */
    public ArticleInfoOneVo selectArticleInfo(String articleId);
    /**
     * 删除单个article
     *
     * @param articleIds
     * @return
     */
    public int deleteArticleById(long articleIds);
    
    /**
     * 审核
     *
     * @param articleId
     * @return
     */
    public int updateArticleAudit(String articleId);
    
    
    /**
     * 发布文章
     *
     * @param articleId
     * @param promulgatorId
     * @return
     */
    public int updateArticlePublish(String articleId, String promulgatorId);
    
    
    public List<String> getArticleTagNames(long articleId);

    public List<Integer> createRandom(int maxNumber);


}
